.TH std::ranges::chunk_by_view::begin 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::ranges::chunk_by_view::begin \- std::ranges::chunk_by_view::begin

.SH Synopsis
   constexpr /*iterator*/ begin();  (since C++23)

   Returns an iterator to the first element of the chunk_by_view.

   Equivalent to:

 ranges::iterator_t<V> iter;

 if (begin_.has_value())
     iter = begin_.value();
 else
 {
     iter = /*find_next*/(ranges::begin(base()));
     begin_ = iter; // caching
 }

 return /*iterator*/(*this, ranges::begin(base()), iter);

   The behavior is undefined if the underlying predicate pred_ does not contain a
   value.

.SH Parameters

   \fI(none)\fP

.SH Return value

   Iterator to the first element.

.SH Notes

   In order to provide the amortized constant-time complexity required by the range
   concept, this function caches the result within the data member begin_ (the name is
   for exposition only) for use on subsequent calls.

.SH Example

    This section is incomplete
    Reason: no example

.SH See also

   end           returns an iterator or a sentinel to the end
   (C++23)       \fI(public member function)\fP
   ranges::begin returns an iterator to the beginning of a range
   (C++20)       (customization point object)

.SH Category:
     * Todo no example
